import {createRouter,createWebHistory} from 'vue-router'
import routes from './routes.js'

const router = createRouter({
    history:createWebHistory(),     //不加报错
    routes,
})

router.openPage = function(path,query){
    this.push({
        path: path,
        query: Object.assign({
            time: new Date().getTime()
        },query||{})
    })
}

export default router 